﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        MyPetShopDataContext db = new MyPetShopDataContext();
        var result = from r in db.Product
                     select new
                     {
                         r.ProductId,
                         r.CategoryId,
                         r.Name
                     };
        GridView1.DataSource = result;
        GridView1.DataBind();





    }
}